Refactor: add checkIfServerSide utility function
#404
Merged
checkIfServerSide utility function
#404