Javascript Check If Function Exists From String To Timestamp